/**
 * 
 */
package br.coppe.coimbra.readability.score;

import br.coppe.coimbra.processing.text.Str;

/**
 * @author phillipe
 *
 */
public abstract class Score {

	/**
	 * 
	 */
	private Score(){}

	public static float fleschKincaidReadingEase(String text) {
		
		return Math.round(
				(248.835 - (1.015 * Str.averageWordsPerSentence(text)))
				- (84.6 * Str.averageSyllablesPerWord(text)));
	}

	public static float fleschKincaidGradeLevel(String text) {

		 return Math.round((0.39 * Str.averageWordsPerSentence(text) +
				 (11.8 * Str.averageSyllablesPerWord(text)) - 15.59));
    
	}

//	public static Object gunningFogScore(String text) {
//		
//		return Math.round(((Str.averageWordsPerSentence(text) + Str.percentageWordsWith3Syllables(text)) * 0.4));
//	}

//	public static double colemanLiauIndex(String text) {
//
//		//TODO Verificar esses numeros magicos e se o arredondamento esta correto.
//		return Math.round( 5.89 * (Str.lettersNumber(text) / Str.wordsNumber(text) -
//				0.3 * (Str.sentencesNumber(text) / Str.wordsNumber(text)) - 15.8 ));
//	}

//	public static  float smogIndex(String text) {
//
//		return Math.round(1.043 * Math.sqrt(((Str.wordsWith3Syllables(text) *
//				(30 / Str.sentencesNumber(text))) + 3.1291)));
//	}

//	public static double automatedReadabilityIndex(String text) {
//
//		//TODO Verificar esses numeros magicos e se o arredondamento esta correto.
//		return Math.round(( 4.71 * (Str.lettersNumber(text) / Str.wordsNumber(text)) + 
//				0.5 * (Str.wordsNumber(text) / Str.sentencesNumber(text)) - 21.43));
//	}
}
